//二维数组遍历
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import org.w3c.dom.ls.LSOutput;

import java.sql.SQLOutput;
import java.util.Scanner;
public class test_01 {
    public static void main(String[] args) {
        int [][] arr = {{1,2,3},{4,5},{6,7,8,9}};
        for(int x = 0;x < arr.length;x++){
            for(int y = 0;y < arr[x].length;y++){
                System.out.print(arr[x][y]+" ");
            }
            System.out.println();
        }
    }
}


//二维数组求和

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import org.w3c.dom.ls.LSOutput;

import java.sql.SQLOutput;
import java.util.Scanner;
public class test_01 {
    public static void main(String[] args) {
        int [][] arr = {{15,24,38},{46,56,11},{71,81,19}};
        int sum = 0;
        for(int x = 0;x < arr.length;x++){
            for(int y = 0;y < arr[x].length;y++) {
                sum = sum + arr[x][y];
            }
        }
        System.out.println(sum);
    }
}
